package com.example.homeworkmanagement.service;

import com.example.homeworkmanagement.dto.ClassesAndStudentsAndSubmissionsAndAssignmentsDTO;
import com.example.homeworkmanagement.pojo.Submissions;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.homeworkmanagement.vo.ResultVO;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author 拒绝加班
 * @since 2025-05-25
 */
public interface SubmissionsService extends IService<Submissions> {

    //根据发布作业id以及学生id提交与更新作业
    ResultVO<Submissions> saveOrUpdateSubmission(Integer assignmentId, String studentId, MultipartFile file);

    //根据发布作业id以及学生id删除作业
    ResultVO<Submissions> deleteSubmission(Integer assignmentId,String studentId);

    //教师批改学生作业
    ResultVO<Submissions> updateSubmissionTea(Integer assignmentId, String studentId, String grade, String feedback);

    //根据发布作业id以及学生id查询作业-更详细
    ResultVO<ClassesAndStudentsAndSubmissionsAndAssignmentsDTO> getSubmission(Integer assignmentId, String studentId);

    //获取学生作业列表
    ResultVO<List<ClassesAndStudentsAndSubmissionsAndAssignmentsDTO>> getSubmissionList(String classIds, Integer assignmentId, int page, int size);

    //根据studentId以及assignmentId查看学生是否有提交作业
    ResultVO<String> isSubmission(Integer assignmentId,String studentId);

}
